build: str.c str_cpy.c str_cat.c
	gcc -shared -fpic -o build/libstr.so build/*.o

str.c: create_build_dir
	gcc -Wall -c -o build/str.o src/str.c

str_cpy.c: create_build_dir
	gcc -Wall -c -o build/str_cpy.o src/str_cpy.c

str_cat.c: create_build_dir
	gcc -Wall -c -o build/str_cat.o src/str_cat.c

create_build_dir:
	mkdir -p build

clean:
	rm -f build/*
